<template>
  <aigc-card >
    <div id="attckIP" class="w-full h-[13vh]"></div>
  </aigc-card>
  <!-- 24小时攻击IP TOP10（柱状图） -->

</template>

<script setup lang="ts">
import  * as echarts from "echarts"
import { onMounted } from 'vue';
import AigcCard from "@/components/aigcCard"

const option = {
  title:{
    text:"24小时攻击IP TOP10",
    left:'center'
  },
  tooltip: {
    trigger: 'item'
  },
  // legend: {
  //   orient: 'vertical',
  //   left: 'left'
  // },
  series: [
    {
      top:25,
      name: '24小时攻击类型分布',
      type: 'pie',
      radius: '99%',
      data: [
        { value: 1048, name: '10.0.0.1' },
        { value: 735, name: '10.0.0.2' },
        { value: 580, name: '10.0.0.3' },
        { value: 1048, name: '10.0.0.4' },
        { value: 735, name: '10.0.0.5' },
        { value: 580, name: '10.0.0.6' },
        { value: 1048, name: '10.0.0.7' },
        { value: 735, name: '10.0.0.8' },
        { value: 580, name: '10.0.0.9' },
        { value: 1048, name: '10.0.0.10' },
     
      ],
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
};
onMounted(async () => {
  const chartDom = await document.getElementById("attckIP")!;
  const myChart = await echarts.init(chartDom);
  option && myChart.setOption(option);
});
</script>